<?php
require_once '../sub/init.php';
if(is_weixin() && empty($cook_openid))$cook_openid = wx_get_openid();
$id = intval($id);$n = intval($n);
require_once ZEAI.'sub/conn.php';
require_once ZEAI.'cache/config_tjdiy.php';
require_once ZEAI.'cache/config_index.php';
require_once ZEAI.'cache/udata.php';
if(!ifint($id)){
	$row = $db->ROW(__TBL_IZT__,"id","flag=1 ORDER BY px DESC,id DESC LIMIT 1","name");
	if ($row){$id=intval($row['id']);}else{alert('亲，专题居然跑路了~',HOST);}
}
/*正文*/
$row = $db->ROW(__TBL_IZT__,"url,title,content,wxshareT,wxshareC,path_b,showtype,par","flag=1 AND id=".$id,"name");
if ($row){
	$url     = dataIO($row['url'],'out');
	if(!empty($url)){header("Location: $url");exit;}
	$title    = trimhtml(dataIO($row['title'],'out'));
	$content  = dataIO($row['content'],'outadm');
	$wxshareT = dataIO($row['wxshareT'],'wx');
	$wxshareC = dataIO($row['wxshareC'],'wx');
	$path_b  = $row['path_b'];
	$showtype_izt = $row['showtype'];
	$par_    = dataIO($row['par'],'out');
	parse_str($par_,$pararr);
}else{
	alert('亲，专题居然跑路了~',HOST);
}
//门店
if(!empty($AGT)){
	$agentSQL2=" AND a.agentid=".$AGT['agentid'];
}
//门店结束
$nodatatips="<div class='nodatatips'><i class='ico'>&#xe608;</i>暂时木有符合条件的会员</div>";
$t=trimhtml(dataIO($t,'out'));
$showtype = (ifint($showtype,'1-3','1'))?$showtype:$showtype_izt;
$_ZEAI['pagesize']= 8;
$fields    = "id,sex,grade,photo_s,photo_f,RZ,love,birthday,edu,pay,job,heigh,weigh,photo_ifshow,flag,areatitle,nickname,aboutus,marrytime,hobby";
$fields   .= ",mate_age1,mate_age2,mate_heigh1,mate_heigh2,mate_weigh1,mate_weigh2,mate_pay,mate_edu,mate_love,mate_car,mate_house,mate_areaid,mate_areatitle,mate_job,mate_child,mate_marrytime,mate_companykind,mate_smoking,mate_drink,mate_areaid2,mate_areatitle2,mate_other";
$ZEAI_SQL  = " flag=1 AND kind<>4 AND sex>0 AND nickname<>'' AND heigh>0 AND birthday<>'0000-00-00'".$agentSQL;
$ORDER     = " ORDER BY refresh_time DESC,id DESC ";
$ZEAI_SQL2 = " a.flag=1 AND a.kind<>4 AND a.sex>0 AND a.nickname<>'' AND a.heigh>0 AND a.birthday<>'0000-00-00'".$agentSQL2;
$fields2   = "a.id,a.sex,a.grade,a.nickname,a.photo_s,a.photo_f,a.RZ,a.birthday,a.edu,a.pay,a.job,a.heigh,a.weigh,a.photo_ifshow,a.areatitle,a.aboutus,a.marrytime";
if(ifint($cook_uid && !empty($cook_sex)) && $_INDEX['iModuleU']==1){
	if($cook_ifadm!=1){
		$ZEAI_SQL  .= ($cook_sex==2)?" AND sex=1 ":" AND sex=2 ";
		$ZEAI_SQL2 .= ($cook_sex==2)?" AND a.sex=1 ":" AND a.sex=2 ";
	}
}
if($showtype==3){
	$ZEAI_SQL  .= " AND photo_s<>'' AND photo_f=1 ";
	$ZEAI_SQL2 .= " AND a.photo_s<>'' AND a.photo_f=1 ";
}
//
$areaid2=arrV($pararr,'areaid2');if (!empty($areaid2))$ZEAI_SQL  .= " AND area2id LIKE '%".$areaid2."%' ";
$sex=arrV($pararr,'sex');if (ifint($sex))$ZEAI_SQL       .= " AND sex=$sex ";
$areaid=arrV($pararr,'areaid');if (!empty($areaid))$ZEAI_SQL   .= " AND areaid LIKE '%".$areaid."%' ";
$age1=arrV($pararr,'age1');if (ifint($age1))$ZEAI_SQL      .= " AND ( (YEAR(CURDATE())-YEAR(birthday)-(RIGHT(CURDATE(),5)<RIGHT(birthday,5))) >= $age1 ) ";
$age2=arrV($pararr,'age2');if (ifint($age2))$ZEAI_SQL      .= " AND ( (YEAR(CURDATE())-YEAR(birthday)-(RIGHT(CURDATE(),5)<RIGHT(birthday,5))) <= $age2 ) ";
$pay=arrV($pararr,'pay');if (ifint($pay))$ZEAI_SQL       .= " AND pay>=$pay ";
$edu=arrV($pararr,'edu');if (ifint($edu))$ZEAI_SQL       .= " AND edu>=$edu ";
$job=arrV($pararr,'job');if (ifint($job))$ZEAI_SQL       .= " AND job=$job ";
$love=arrV($pararr,'love');if (ifint($love))$ZEAI_SQL      .= " AND love=$love ";
$child=arrV($pararr,'child');if (ifint($child))$ZEAI_SQL     .= " AND child=$child ";
$marrytype=arrV($pararr,'marrytype');if (ifint($marrytype))$ZEAI_SQL .= " AND marrytype=$marrytype ";
$marrytime=arrV($pararr,'marrytime');if (ifint($marrytime))$ZEAI_SQL .= " AND marrytime=$marrytime ";
$heigh1=arrV($pararr,'heigh1');if (ifint($heigh1))$ZEAI_SQL    .= " AND ( heigh >= $heigh1 ) ";
$heigh2=arrV($pararr,'heigh2');if (ifint($heigh2))$ZEAI_SQL    .= " AND ( heigh <= $heigh2 ) ";
$weigh1=arrV($pararr,'weigh1');if (ifint($weigh1))$ZEAI_SQL    .= " AND ( heigh >= $weigh1 ) ";
$weigh2=arrV($pararr,'weigh2');if (ifint($weigh2))$ZEAI_SQL    .= " AND ( weigh <= $weigh2 ) ";
$car=arrV($pararr,'car');if (ifint($car))$ZEAI_SQL       .= " AND car>=$car ";
$house=arrV($pararr,'house');if (ifint($house))$ZEAI_SQL     .= " AND house=$house ";
$smoking=arrV($pararr,'smoking');if (ifint($smoking))$ZEAI_SQL     .= " AND smoking=$smoking ";
$drink=arrV($pararr,'drink');if (ifint($drink))$ZEAI_SQL       .= " AND drink=$drink ";
$companykind=arrV($pararr,'companykind');if (ifint($companykind))$ZEAI_SQL .= " AND companykind=$companykind ";
$ifmob=arrV($pararr,'ifmob');if (ifint($ifmob))$ZEAI_SQL       .= " AND mob<>'' ";
$ifdata=arrV($pararr,'ifdata');if (ifint($ifdata))$ZEAI_SQL      .= " AND myinfobfb>10 ";
$ifadmid=arrV($pararr,'ifadmid');if ($ifadmid==1)$ZEAI_SQL .= " AND admid>0 ";
$iftguid=arrV($pararr,'iftguid');if ($iftguid==1)$ZEAI_SQL .= " AND tguid>0 ";
$ifdata50=arrV($pararr,'ifdata50');if($ifdata50 == 1)$ZEAI_SQL .= " AND myinfobfb>50 ";
$ifparent=arrV($pararr,'ifparent');if($ifparent == 1)$ZEAI_SQL .= " AND parent>1 ";
$photo_s=arrV($pararr,'photo_s');if ($photo_s == 1)$ZEAI_SQL .= " AND photo_s<>'' ";
$grade2=arrV($pararr,'grade2');if ($grade2 == 1)$ZEAI_SQL  .= " AND grade>1 ";
$grade=arrV($pararr,'grade');if (ifint($grade))$ZEAI_SQL .= " AND grade=".$grade;
//
$ZEAI_SQL .= " AND photo_s<>'' AND photo_f=1 ";
$ZEAI_SELECT="SELECT $fields FROM ".__TBL_USER__." WHERE ".$ZEAI_SQL.$ORDER;
$TP=getTP($ZEAI_SQL);$ZEAI_total=$TP[0];$ZEAI_totalP=$TP[1];
//switch
//
$cs = "t=".$t."&showtype=".$showtype."&id=".$id.$par;
if($submitok=='ZEAI_list'){exit(Zeai_ajax_list_fn($ZEAI_totalP,$p,2));}
$FT=json_decode(FT,true);
$showstr1='<i class="ico">&#xe67a;</i>头像';
$showstr2='<i class="ico">&#xe65e;</i>列表';
$showstr3='<i class="ico">&#xe65f;</i>大图';
switch ($showtype) {
	case 2:$showcls = 'LIST_list';$showstr=$showstr2;break;
	case 3:$showcls = 'PIC_list';$showstr=$showstr3;break;
	default:$showcls= 'ZEAI_list';$showstr=$showstr1;break;
}
$db->query("UPDATE ".__TBL_IZT__." SET click=click+1 WHERE id=".$id);
$jumpurl = HOST.'/m/izt.php?id='.$id;
?>
<!doctype html><html><head><meta charset="utf-8">
<title><?php echo $title;?> - <?php echo $_ZEAI['siteName'];?></title>
<?php echo HEADMETA;?>
<meta name="Keywords" content="<?php echo $title;?>">
<meta name="Description" content="<?php echo trimhtml($content);?>">
<meta name="generator" content="Zeai.cn v9" />
<link href="<?php echo RES;?>m/css/m.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo RES;?>m/css/izt.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo HOST;?>/cache/zeaicolor.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<script src="<?php echo RES;?>www_zeai_cn.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script>var browser='<?php echo browser();?>',id=<?php echo intval($id);?>,showtype=<?php echo intval($showtype);?>,pagemore=<?php echo ($ZEAI_total > $_ZEAI['pagesize'])?'true':'false';?>;</script>
<script src="<?php echo RES;?>m/js/m.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>m/js/izt.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<?php
if (is_weixin()){
	require_once ZEAI."api/weixin/jssdk.php";?>
	<script src="<?php echo RES; ?>jweixin-1.2.0.js"></script>
	<script>
	wx.config({debug:false,appId: '<?php echo $signPackage["appId"];?>',timestamp: <?php echo $signPackage["timestamp"];?>,nonceStr:'<?php echo $signPackage["nonceStr"];?>',signature: '<?php echo $signPackage["signature"];?>',jsApiList:['hideMenuItems','onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','previewImage']});
	var FX_title = '<?php echo $wxshareT;?>',
	FX_desc  = '<?php echo trimhtml($wxshareC).'【'.$_ZEAI['siteName'].'】';?>',
	FX_link  = '<?php echo $jumpurl; ?>',
	FX_imgurl= '<?php echo UP.$path_b; ?>';
	wx.ready(function () {
		wx.onMenuShareAppMessage({title:FX_title,desc:FX_desc,link:FX_link,imgUrl:FX_imgurl});
		wx.onMenuShareTimeline({title:FX_title,link:FX_link,imgUrl:FX_imgurl});
	});
	</script>
<?php }?>
<style>
#backtop a{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.btmKefuBtn,.LIST_list dl .zoyq li{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>;color:#fff}
#showtype_box a.ed,#showtype_box a.ed i{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.ZEAI_list a .uinfo .data span b{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.1);color:<?php echo $_ZEAI['mob_mbcolor'];?>;}
.ZEAI_list a em .nik{background:url("<?php echo RES;?>m/img/nikbg.png");background-size:100% 100%}
.LIST_list dl dd h5 li{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.05);color:<?php echo $_ZEAI['mob_mbcolor'];?>;border-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.1)}
.bouncelogin em img{border-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.2)}
.izt .iztbox ul a.ed{box-shadow:0 .3rem .5rem 0 rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.2);background:-webkit-linear-gradient(170deg,rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.6) 0%,<?php echo $_ZEAI['mob_mbcolor'];?> 100%);background-color:#fff}
</style>
</head><body>
<a class="UgobackFix" href="javascript:zeai.back();"><i class='ico'>&#xe602;</i></a>
<?php if (!empty($path_b)){?>
    <div class="detail_BN">
        <img src="<?php echo UP.$path_b;?>">
    </div><?php
}
$rt=$db->query("SELECT id,title,path_s,url FROM ".__TBL_IZT__." WHERE flag=1 AND path_s<>'' ORDER BY px DESC,id DESC");
$total = $db->num_rows($rt);
if ($total > 0) {?>
	<div class="izt">
		<div class="iztbox"><ul id="izt_move">
		<?php
		for($i=1;$i<=$total;$i++) {
			$rows = $db->fetch_array($rt,'name');
			if(!$rows) break;
			$fid=$rows['id'];
			$path_s=$rows['path_s'];
			$url=trimhtml(dataIO($rows['url'],'out'));
			$ftitle=trimhtml(dataIO($rows['title'],'out'));
			$url=(!empty($url))?$url:HOST.'/m/izt.php?n='.$i.'&id='.$fid;
			$cls=($fid==$id)?' class="ed"':'';
			echo '<a href="'.$url.'"'.$cls.'>'.$ftitle.'</a>';//<img src="'.UP.$path_s.'">
		}?>
		</ul></div>
	</div>
	<?php
}
if(!empty($content)){?><div class="C"><?php echo $content;?></div><?php }?>
<div class="<?php echo $showcls;?>" id="ZEAI_list"><?php if($ZEAI_totalP>0){echo Zeai_ajax_list_fn($ZEAI_totalP,$p,2);}else{echo $nodatatips;}?></div>
<script>var scs='<?php echo trimhtml($cs); ?>';</script>
<?php if ($ZEAI_total > $_ZEAI['pagesize']){?>
<div class="blankbottom"></div>
<script>
var ZEAI_totalP = parseInt(<?php echo $ZEAI_totalP; ?>);
var postjson = {submitok:'ZEAI_list',ZEAI_totalP:ZEAI_totalP};
if(!zeai.empty(scs))Object.assign(postjson,tojson(scs.split('&')));
zeaiOnscroll_json={url:MHOST+'/izt'+zeai.extname,data:postjson};
<?php echo(ifint($cook_uid))?'var iflogin=true;':'var iflogin=false;';?>
</script>
<!--游弹-->
<?php if(!ifint($cook_uid)){?>
<div id="index_bounce_box" class="bouncelogin">
    <em><img src="<?php echo RES;?>photo_m.jpg?<?php echo $_ZEAI['cache_str'];?>"></em>
	<h1>注册/登录 查看更多会员<br>缘分就在一瞬间，赶快去登录！</h1>
	<a class="btn size4 zeaibg W80_ yuan" href="<?php echo HOST;?>/m/login.php"><font>去注册/登录</font><span class="zeaicolor">私密</span></a>
    <a class="closediv" href="javascript:index_divclose.click();">暂不登录</a>
</div>
<?php }}
if ($ZEAI_total > 0){?>
<a href="javascript:zeai.mask({son:showtype_box,maskcls:'mask_TRnav'});" id="showtype" class="btmKefuBtn"><?php echo $showstr;?></a>
<div id="showtype_box">
    <a<?php echo ($showtype==1)?' class="ed"':'';?>><?php echo $showstr1;?></a>
    <a<?php echo ($showtype==2)?' class="ed"':'';?>><?php echo $showstr2;?></a>
    <a<?php echo ($showtype==3)?' class="ed"':'';?>><?php echo $showstr3;?></a>
</div>
<?php }?>
<div id="backtop"><a id="btmTopBtn" onClick="zeai.setScrollTop(0);"><i class="ico">&#xe60c;</i>顶部</a></div>
<div class="blank"></div>
<?php
if($n>=4){echo "<script>setTimeout(function(){hdnavLRmoveFn(izt_move,90,'r');},10);</script>";}
if (is_weixin() && ifint($cook_uid)){wx_endurl('您刚刚浏览的页面【用户专区】',$jumpurl);}
function getTP($TJ,$moretb=false) {
	global $_ZEAI,$db;
	if($moretb){
		$rt = $db->query("SELECT COUNT(*) FROM (".$TJ.") ZEAI__cn_SQL");$row = $db->fetch_array($rt,'num');
	}else{
		$rt = $db->query("SELECT COUNT(*) FROM (SELECT id FROM ".__TBL_USER__." WHERE ".$TJ." LIMIT ".$_ZEAI['limit'].") ZEAI__cn_SQL");$row = $db->fetch_array($rt,'num');
	}
	$total=$row[0];
	return array($total,ceil($total/$_ZEAI['pagesize']));
}
function mate_echo($row,$kind='') {
	global $_ZEAI;
	if(empty($_ZEAI['mate_diy']))return '';
	$mate_diy = explode(',',$_ZEAI['mate_diy']);
	$mate_age1      = intval($row['mate_age1']);
	$mate_age2      = intval($row['mate_age2']);
	$mate_heigh1    = intval($row['mate_heigh1']);
	$mate_heigh2    = intval($row['mate_heigh2']);
	$mate_pay       = $row['mate_pay'];
	$mate_edu       = $row['mate_edu'];
	$mate_areaid    = $row['mate_areaid'];
	$mate_areatitle = $row['mate_areatitle'];$mate_areatitle=str_replace(" ","",$mate_areatitle);
	$mate_love      = $row['mate_love'];
	$mate_car       = $row['mate_car'];
	$mate_house     = $row['mate_house'];
	$mate_weigh1      = intval($row['mate_weigh1']);
	$mate_weigh2      = intval($row['mate_weigh2']);
	$mate_job         = $row['mate_job'];
	$mate_child       = $row['mate_child'];
	$mate_marrytime   = $row['mate_marrytime'];
	$mate_companykind = $row['mate_companykind'];
	$mate_smoking     = $row['mate_smoking'];
	$mate_drink       = $row['mate_drink'];
	$mate_areaid2     = $row['mate_areaid2'];
	$mate_areatitle2  = $row['mate_areatitle2'];$mate_areatitle2=str_replace(" ","",$mate_areatitle2);
	$mate_other       = dataIO($row['mate_other'],'out');
	$ifmate = ( !empty($mate_age1) || !empty($mate_age2) || !empty($mate_heigh1) || !empty($mate_heigh2) || !empty($mate_pay) || !empty($mate_edu) || !empty($mate_areaid) || !empty($mate_areatitle) || !empty($mate_love) || !empty($mate_house) || !empty($mate_job) || !empty($mate_child) || !empty($mate_marrytime) || !empty($mate_companykind) || !empty($mate_smoking) || !empty($mate_drink) || !empty($mate_areaid2)  || !empty($mate_areatitle2) || !empty($mate_other)  )?true:false;
	if($ifmate){
		$mate_age       = $mate_age1.','.$mate_age2;
		$mate_age_str   = mateset_out($mate_age1,$mate_age2,'岁');
		$mate_age_str = str_replace("不限","",$mate_age_str);
		$mate_heigh     = $mate_heigh1.','.$mate_heigh2;
		$mate_heigh_str = mateset_out($mate_heigh1,$mate_heigh2,'cm');
		$mate_heigh_str = str_replace("不限","",$mate_heigh_str);
		$mate_weigh     = $mate_weigh1.','.$mate_weigh2;
		$mate_weigh_str = mateset_out($mate_weigh1,$mate_weigh2,'kg');
		$mate_weigh_str = str_replace("不限","",$mate_weigh_str);
		$mate_areaid_str  = (!empty($mate_areatitle))?$mate_areatitle:'';
		$mate_areaid2_str = (!empty($mate_areatitle2))?$mate_areatitle2:'';
		$mate_pay_str   = udata('pay',$mate_pay);
		$mate_edu_str   = udata('edu',$mate_edu);
		$mate_love_str  = udata('love',$mate_love);
		$mate_car_str   = udata('car',$mate_car);
		$mate_house_str = udata('house',$mate_house);
		$mate_job_str         = udata('job',$mate_job);
		$mate_child_str       = udata('child',$mate_child);
		$mate_marrytime_str   = udata('marrytime',$mate_marrytime);
		$mate_companykind_str = udata('companykind',$mate_companykind);
		$mate_smoking_str     = udata('smoking',$mate_smoking);
		$mate_drink_str       = udata('drink',$mate_drink);
		$mate_li_out='';
		if (count($mate_diy) >= 1 && is_array($mate_diy)){
			foreach ($mate_diy as $k=>$V) {
				$ext = mate_diy_par($V,'ext');
				$tmpD = 'mate_'.$V;
				$tmpS = 'mate_'.$V.'_str';
				$mate_data = $$tmpD;
				$mate_str  = $$tmpS;
				if(!empty($mate_data) && $mate_data!='0,0'){
					switch ($ext) {
						case 'checkbox':
							$mate_str_=explode(',',$mate_str);
							$mate_strN=count($mate_str_);
							if($mate_strN>1){
								$matesonli='';
								foreach ($mate_str_ as $ks=>$Vs) {$matesonli.='【'.$Vs.'】';}
								$mate_str = $matesonli;
							}
						break;
						default:break;
					}
					if($kind=='text'){
						$mate_li_out.=$mate_str.'，';
					}elseif($kind=='li'){
						if(!empty($mate_str))$mate_li_out.='<li>'.$mate_str.'</li>';
					}else{
						$mate_li_out.='<li><font>'.mate_diy_par($V).'：</font>'.$mate_str.'</li>';
					}
				}
			}
			if($kind=='text'){
				$mate_li_out = rtrim($mate_li_out,'，');
				$mate_li_out = str_replace("不限","",$mate_li_out);
				$mate_li_out .= (!empty($mate_other))?'，其他要求：'.$mate_other:'';
			}elseif($kind=='li'){
				$mate_li_out .= (!empty($mate_other))?'<li>'.$mate_other.'</li>':'';
			}else{
				$mate_li_out .= (!empty($mate_other))?'<li><font>其他要求：</font>'.$mate_other.'</li>':'';
			}
		}
	}
	return $mate_li_out;
}
//
function rows_ulist2($rows,$p,$n=1) {
	global $db,$_ZEAI,$cook_uid,$cook_sex,$cook_grade,$zeai_cn,$t,$showtype;
	$uid       = $rows['id'];
	$uflag     = $rows['flag'];
	$sex       = $rows['sex'];
	$grade     = $rows['grade'];
	$photo_s   = $rows['photo_s'];
	$photo_f   = $rows['photo_f'];
	$heigh     = $rows['heigh'];
	$weigh     = $rows['weigh'];
	$job       = $rows['job'];
	$love      = $rows['love'];
	$areatitle = $rows['areatitle'];
	$birthday  = $rows['birthday'];
	$nickname  = trimhtml(dataIO($rows['nickname'],'out'));
	$age = getage($rows['birthday']);
	$RZ  = $rows['RZ'];$RZarr = explode(',',$RZ);
	$pay = $rows['pay'];
	$edu = $rows['edu'];
	$hobby = $rows['hobby'];
	$photo_ifshow = $rows['photo_ifshow'];
	$mate = mate_echo($rows,'text');
	$aboutus = trimhtml(dataIO($rows['aboutus'],'out'));
	$marrytime = $rows['marrytime'];
	$smb=($showtype==3)?'b':'m';
	$photo_m_url  = photo_s_out('{"smb":"'.$smb.'","sex":"'.$sex.'","photo_s":"'.$photo_s.'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"url"}');
	$photo_s_flag = photo_s_out('{"smb":"'.$smb.'","sex":"'.$sex.'","photo_s":"'.$photo_s.'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"flag"}');
	$href=mHref('u',$uid);
	if($showtype==2){//列表
		$unifo1='';
		if(!empty($areatitle)){
			$aARR = explode(' ',$areatitle);
			$A2 = $aARR[1];
			$A3 = $aARR[2];
			if(!empty($A2) || !empty($A3))$unifo1 = $A2.$A3.'　';
		}
		$unifo1 .= ($age<=0)?'':$age.'岁'.'　';
		$unifo1 .= (empty($love))?'':udata('love',$love).'　';
		$unifo1 .= (empty($heigh))?'':udata('heigh',$heigh).'　';
		$unifo1 .= (empty($weigh))?'':udata('weigh',$weigh).'　';
		$unifo1 .= (empty($job))?'':udata('job',$job).'　';
		$unifo1 .= (empty($edu))?'':udata('edu',$edu).'　';
		$unifo1 .= (empty($pay))?'':udata('pay',$pay).'　';
		$unifo1  = rtrim($unifo1,'　');

		$hobby = (empty($hobby))?'':udata('hobby',$hobby);
		if(!empty($hobby)){
			$hobbyARR = explode(',',$hobby);
			if (count($hobbyARR) >= 1 && is_array($hobbyARR)){
				foreach ($hobbyARR as $v) {$uinfo2 .= '<li>'.$v.'</li>';}
			}
		}
		$uinfo2 = (!empty($uinfo2))?$uinfo2:'';
		if(empty($uinfo2)){
			$uinfo2 = (empty($marrytime))?'':'<li>期望'.udata('marrytime',$marrytime).'结婚</li>';	
		}
		if($t=='gps'){
			if(!empty($areatitle))$A_str='<b>'.$A2.'·'.$A3.'</b>';
			$distance = $rows['distance'];
			if ($distance<1000){
				$distance_str  = $distance.'m';
			}else{
				$distance_str  = number_format($distance/1000).'km';
			}
			$uinfo3='<span class="zeaicolor"><i class="ico">&#xe624;</i> '.$distance_str.'</span>';
		}else{
			$gps_str='';
		}
		$em = (!empty($aboutus))?'<em><div>'.$aboutus.'</div></em>':'';
		//相册
		$pathlist = '';
		$rt2=$db->query("SELECT path_s FROM ".__TBL_PHOTO__." WHERE uid=".$uid." AND flag=1 ORDER BY id DESC LIMIT 3");
		$photo_total = $db->num_rows($rt2);
		if ($photo_total>0) {
			$pathlist = '<div class="pathlist">';
			for($i2=1;$i2<=$photo_total;$i2++) {
				$rows2 = $db->fetch_array($rt2,'num');
				if(!$rows2) break;
				$photo_flag = photo_s_out('{"sex":"'.$sex.'","photo_s":"'.$rows2[0].'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"flag"}');
				$photo_cls  = (!$photo_flag)?' class="blur"':'';
				$pathlist  .= '<img src="'.UP.$rows2[0].'"'.$photo_cls.'>';
			}
			$pathlist .= '</div>';
		}
		//输出
		$O  = '<a href="'.$href.'"><dl>';
		$O .= '<dt><img src="'.$photo_m_url.'" class="alpha0_100_1s">';
		$O .= ($grade>1)?'<img src="'.RES.'m/img/vipj.png" class="vipj">':'';
		$O .= '</dt>';
		$O .= '<dd><h4><span>'.$nickname.'</span>'.uicon($sex.$grade).'</h4>';//if (!empty($RZ))$O.= RZ_html($RZ,'s','color');
		$O .='<h6>'.$unifo1.'</h6><h5>'.$uinfo2.'</h5>';
		if (!empty($pathlist))$O .= $pathlist;
		$O .= '</dd>';
		if(in_array('photo',$RZarr)){
			$O.= '<img src="'.RES.'m/img/rzj2.png?'.$_ZEAI['cache_str'].'" class="rzj">';
		}elseif(in_array('identity',$RZarr)){
			$O.= '<img src="'.RES.'m/img/rzj.png?'.$_ZEAI['cache_str'].'" class="rzj">';
		}
		$O .= $gps_str.$em;
		if(in_array('store',$RZarr))$O.= '<img src="'.RES.'cert_store.png?'.$_ZEAI['cache_str'].'" class="cert_store">';
		if (!empty($mate))$O .= $zoyq_str = '<div class="zoyq"><li>寻觅</li>'.$mate.'</div>';
		$O .= '<div class="clear"></div></dl></a>';
	}elseif($showtype==3){//大图
		$aARR = explode(' ',$areatitle);$areatitle_str = (!empty($aARR[1]))?$aARR[1]:$aARR[0];
		if($t=='gps'){
			$distance = $rows['distance'];
			if ($distance<1000){
				$distance_str  = $distance.'m';
			}else{
				$distance_str  = number_format($distance/1000).'km';
			}
			$areatitle_str = (empty($areatitle_str))?'':'<i class="ico">&#xe624;</i> '.$distance_str;
			$marrytime = '<font>'.$aARR[1].' '.$aARR[2].' '.$aARR[3].'</font>';
		}else{
			$areatitle_str = (empty($areatitle_str))?'':'<i class="ico">&#xe624;</i>'.$areatitle_str.'';
			$marrytime = (empty($marrytime))?'':'<font>期望'.udata('marrytime',$marrytime).'结婚</font>';
		}
		$unifo='';
		$unifo .= ($age<=0)?'':'<li>'.$age.'岁</li>';
		$unifo .= (empty($heigh))?'':'<li>'.udata('heigh',$heigh).'</li>';
		$unifo .= (empty($edu))?'':'<li>'.udata('edu',$edu).'</li>';
		//$unifo .= (empty($job))?'':'<li>'.udata('job',$job).'</li>';
		$unifo .= (empty($pay))?'':'<li>'.udata('pay',$pay).'</li>';
		$O = '<a href="'.$href.'"><em><img class="alpha0_100_1s m" src="'.$photo_m_url.'">';
		$O .= ($grade>1)?'<img src="'.RES.'m/img/vipj.png" class="vipj">':'';
		$O .= '</em>';
		$O .= '<div class="uinfo">';
		$O .= '	<div class="nik"><span><h4>'.$nickname.'</h4>'.uicon($sex.$grade).'</span>'.$marrytime.'</div>';
		$O .= '	<div class="data"><span>'.$unifo.'</span><span>'.$areatitle_str.'</span></div>';
		$O .= '	<div class="about">'.$aboutus.'</div>';
		$O .= '</div>';
		if(@count($RZarr)>1)$O.= '<img src="'.RES.'m/img/rzj.png" class="rzj">';
		if (!empty($RZ))$O.= '<div class="payrz">'.RZ_html($RZ,'s','color').'</div>';
		$O.= '</a>';
	}else{//默认双排
		$age_str   = ($age>18)?$age.'岁':'';
		$edu_str   = (ifint($edu))?udata('edu',$edu):'';
		$heigh_str = (ifint($heigh))?' · '.udata('heigh',$heigh).' · ':'';
		$pay_str   = (ifint($pay))?'<b>'.udata('pay',$pay).'</b>':'';
		$job_str   = (ifint($job))?'<b>'.udata('job',$job).'</b>':$pay_str;
		$love_str  = (ifint($love))?'<b>'.udata('love',$love).'</b>':'';
		$A='';
		if(!empty($areatitle)){
			$A=explode(' ',$areatitle);$A1=$A[0];$A2=$A[1];$A3=$A[2];
			if(!empty($A2)){$A=$A2;}elseif(!empty($A1)){$A=$A1;}
		}
		$A_str = (!empty($A))?'<b><strong class="ico">&#xe624;</strong>'.$A.'</b>':$love_str;
		if($t=='gps'){
			if(!empty($areatitle))$A_str='<b>'.$A2.'·'.$A3.'</b>';
			$distance = $rows['distance'];
			if ($distance<1000){
				$distance_str  = $distance.'m';
			}else{
				$distance_str  = number_format($distance/1000).'km';
			}
			$job_str='<b class="ico">&#xe624; '.$distance_str.'</b>';
		}
		$O  = '<a href="'.$href.'"'.$vip_class.'><em><img class="alpha0_100_1s m" src="'.$photo_m_url.'" />';
		$O .= '<div class="nik">'.'<span>'.$nickname.'</span></div>';//.uicon($sex.$grade)
		$O .= ($grade>1)?'<img src="'.RES.'m/img/vipj.png" class="vipj">':'';
		$O .= '</em>';
		$O .= '<div class="uinfo">';
		$O.= '<div class="data"><span><font>'.$age_str.$heigh_str.$edu_str.'</font></span><span>'.$A_str.$job_str.'</span></div>';//'.uicon($sex.$grade).'
		$O .= '</div>';
		if(in_array('photo',$RZarr)){
			$O.= '<img src="'.RES.'m/img/rzj2.png?'.$_ZEAI['cache_str'].'" class="rzj">';
		}elseif(in_array('identity',$RZarr)){
			$O.= '<img src="'.RES.'m/img/rzj.png?'.$_ZEAI['cache_str'].'" class="rzj">';
		}
		$O.= '</a>';
		if($n % 2 == 0)$O.= '<div class="clear"></div>';
	}
	return $O;
}
function arrV($pararr,$F) {
	if (count($pararr) >= 1 && is_array($pararr)){
		foreach ($pararr as $k=>$v) {
			if($F==$k)return $v;
		}
	}
	return '';
}
if($_ZEAI['m_mb']==2){
	require_once ZEAI.'m/bottom2.php';
}else{
	require_once ZEAI.'m/bottom.php';
}
?>